package com.bootdo.system.service.impl;

import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.util.*;

import com.bootdo.common.config.BootdoConfig;
import com.bootdo.common.config.Constant;
import com.bootdo.common.domain.FileDO;
import com.bootdo.common.service.FileService;
import com.bootdo.common.utils.*;
import com.bootdo.system.vo.UserVO;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.bootdo.common.domain.Tree;
import com.bootdo.system.dao.DeptDao;
import com.bootdo.system.dao.PayDao;
import com.bootdo.system.dao.SuyongDao;
import com.bootdo.system.dao.UserDao;
import com.bootdo.system.dao.UserRoleDao;
import com.bootdo.system.domain.DeptDO;
import com.bootdo.system.domain.PayDO;
import com.bootdo.system.domain.SuyongDO;
import com.bootdo.system.domain.UserDO;
import com.bootdo.system.domain.UserRoleDO;
import com.bootdo.system.service.SuyongService;
import com.bootdo.system.service.UserOldService;
import com.bootdo.system.service.UserService;
import org.springframework.web.multipart.MultipartFile;

import javax.imageio.ImageIO;

@Service
public class SuyongServiceImpl implements SuyongService {
	
	@Autowired
	SuyongDao suyongDao;



	private static final Logger logger = LoggerFactory.getLogger(UserService.class);

	@Override
	public SuyongDO get(Long id) {
		// TODO Auto-generated method stub
		return suyongDao.get(id);
	}

	@Override
	public List<SuyongDO> list(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return suyongDao.list(map);
	}

	@Override
	public List<SuyongDO> listUser(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int count(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return suyongDao.count(map);
	}

	@Override
	public int save(SuyongDO user) {
		// TODO Auto-generated method stub
		return suyongDao.save(user);
	}

	@Override
	public int update(SuyongDO user) {
		// TODO Auto-generated method stub
		return suyongDao.update(user);
	}

	@Override
	public int remove(Long userId) {
		// TODO Auto-generated method stub
		return suyongDao.remove(userId);
	}

	@Override
	public int batchremove(Long[] userIds) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public boolean exit(Map<String, Object> params) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public Set<String> listRoles(Long userId) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int resetPwd(UserVO userVO, SuyongDO SuyongDO) throws Exception {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int adminResetPwd(UserVO userVO) throws Exception {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public Tree<DeptDO> getTree() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int updatePersonal(SuyongDO SuyongDO) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public Map<String, Object> updatePersonalImg(MultipartFile file, String avatar_data, Long userId) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int updatePhone(SuyongDO SuyongDO) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public boolean noexit(Map<String, Object> params) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public int saveAdmin(SuyongDO user) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<SuyongDO> listAllUser(String provice) {
		// TODO Auto-generated method stub
		return suyongDao.listAllUser(provice);
	}

	@Override
	public List<SuyongDO> listAll() {
		// TODO Auto-generated method stub
		return suyongDao.listAll();
	}

	
}
